package Threadprojects.pro2_knn.bean;

public class Distance implements Comparable<Distance>{
    int index;
    double distance;


    @Override
    public int compareTo(Distance o) {
        if (this.distance>o.distance){
            return 1;
        }else if (this.distance==o.distance){
            return 0;
        }
        return -1;
    }

    public int getIndex() {
        return index;
    }

    public void setDistance(double distance) {
        this.distance = distance;
    }

    public double getDistance() {
        return distance;
    }

    public void setIndex(int index) {
        this.index = index;
    }


}
